import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Index'
import First from '@/components/first/First'
import UserInfo from '@/components/user/UserInfo'
import Expr from '@/components/expr/Index'
import AddExpr from '@/components/expr/AddExpr'
import ExprInfo from '@/components/expr/ExprInfo'
import Item from '@/components/item/Index'
import Admin from '@/components/admin/Index'
import ExprInfo2 from '@/components/admin/ExprInfo'
import ExprRecord from '@/components/admin/ExprRecord'
import ExprStep from '@/components/admin/ExprStep'
import ExprData from '@/components/admin/ExprData'

Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', component: Index },
    {
      path: '/index', name: 'Index', component: Index, children: [
        { path: '/first', name: 'First', component: First },
        { path: '/user', name: 'UserInfo', component: UserInfo },
        { path: '/expr', name: 'Expr', component: Expr },
        { path: '/exprInfo', name: 'ExprInfo', component: ExprInfo },
        { path: '/addExpr', name: 'AddExpr', component: AddExpr },
        { path: '/item', name: 'Item', component: Item },
        { path: '/admin', name: 'Admin', component: Admin, children:[
          { path: '/admin/exprInfo', name: 'ExprInfo2', component: ExprInfo2 },
          { path: '/admin/exprRecord', name: 'ExprRecord', component: ExprRecord },
          { path: '/admin/exprStep', name: 'ExprStep', component: ExprStep },
          { path: '/admin/exprData', name: 'ExprData', component: ExprData },
        ] }
      ]
    },

  ]
})
